package com.bjut.vehicleshow.controller;

import com.bjut.vehicleshow.pojo.StationInfoDO;
import com.bjut.vehicleshow.service.StationInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("stationInfo/")
@Api(value = "stationInfo", tags = "stationInfo")
public class StationInfoController {

    @Autowired
    private StationInfoService stationInfoService;

    @GetMapping(value = "")
    @ApiOperation(httpMethod = "GET", value = "stationInfo")
    public List<StationInfoDO> getStationInfo(@RequestParam(value = "flag", required = false) Integer flag) {
        return stationInfoService.getStation(flag);
    }
}
